package cate.game.notice;

import cate.game.notice.msg.NoticeDialogResp;
import cate.game.res.MixRes;
import easy.java.dev.note.NoteField;

import java.util.List;
import java.util.Map;

public class DialogRespBuilder implements INoticeRespBuilder<NoticeDialogResp> {
    @NoteField(value = "通知类型", example = "0:默认, 1:获得奖励通知")
    private byte type;

    @NoteField(value = "通知标题", example = "公会战即将开始")
    private String title;

    @NoteField(value = "内容ID", example = "0: #, 代表以第一个参数替换整个配置文本")
    private int contentId;

    @NoteField(value = "内容参数")
    private List<Object> paramList;

    @NoteField(value = "奖励", detail = "模板数据")
    private MixRes reward;

    @NoteField(value = "实例奖励", detail = "Map<背包类型,实例id们>")
    private Map<Byte, List<String>> instanceMap;

    public DialogRespBuilder type(byte type){
        this.type = type;
        return this;
    }

    public DialogRespBuilder title(String title){
        this.title = title;
        return this;
    }

    public DialogRespBuilder contentId(int contentId){
        this.contentId = contentId;
        return this;
    }

    public DialogRespBuilder paramList(List<Object> paramList){
        this.paramList = paramList;
        return this;
    }

    public DialogRespBuilder reward(MixRes reward){
        this.reward = reward;
        return this;
    }

    public DialogRespBuilder instanceMap(Map<Byte, List<String>> instanceMap){
        this.instanceMap = instanceMap;
        return this;
    }

    @Override
    public NoticeDialogResp build() {
        NoticeDialogResp resp = new NoticeDialogResp();
        resp.contentId = contentId;
        resp.title = title;
        resp.type = type;
        resp.paramList = paramList;
        resp.reward = reward;
        resp.instanceMap = instanceMap;
        return resp;
    }
}
